<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
        <div id="app">
			  <h1>Hello App!</h1>
			  <p>
			    <!-- 使用 router-link 组件来导航. -->
			    <!-- 通过传入 `to` 属性指定链接. -->
			    <!-- <router-link> 默认会被渲染成一个 `<a>` 标签 -->
			    <router-link to="/user/foo">Go to User</router-link>
			  </p>
			  <!-- 路由出口 -->
			  <!-- 路由匹配到的组件将渲染在这里 -->
			  <router-view></router-view>
			  <router-view name="a"></router-view>
			  <router-view name="b"></router-view>
		</div>
		<script src="https://unpkg.com/vue/dist/vue.js"></script>
		<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
		<script>
			    //命名视图
				const router = new VueRouter({
					  routes: [
					    {
					      path: '/',
					      components: {
					        default: Foo,
					        a: Bar,
					        b: Baz
					      }
					    }
					  ]
				})
		</script>
	</body>
</html>
